abstract class Target {
    abstract operate() : void;
}

class Adaptee {
    doSomething() {
        console.log('Adapter do something');
    }
}

class Adapter extends Target {
    adapter: Adaptee;
    constructor(adapter: Adaptee) {
        super();
        this.adapter = adapter;
    }
    operate() {
        console.log('operate');
        this.adapter.doSomething();
    }
}

const adapter: Adapter = new Adapter(new Adaptee());
adapter.operate();